package thread;

public class ThreadDemo33 {
    public static void main(String[] args) throws InterruptedException {
        MyThreadPoolExecutor executor = new MyThreadPoolExecutor(4);
        for(int i = 0; i<1000; i++) {
            int n = i;
            executor.submit(new Runnable() {
                @Override
                public void run() {
                    System.out.println("执行任务 " + n + " , 当前线程为: " + Thread.currentThread().getName());
                }
            });
        }
    }
}
